#include <algorithm>
#include <compare>
#include <fmt/format.h>
#include <iostream>
#include <iterator>
#include <ostream>
#include <stdexcept>
#include <string>
#include <vector>

int main()
{
    std::vector integers{ 1, 2, 3, 4, 5 };
    //out put
    //std::vector<int> integers{ values.cbegin(), values.cend() };
    std::ostream_iterator<int> output{ std::cout, "," };
    std::cout << "integers contains: ";
    std::copy(integers.cbegin(), integers.cend(), output);
    std::cout << std::endl;
    // //get
    std::cout << fmt::format("front:{},back:{}\n", integers.front(), integers.back());
    //set
    integers[0] = 11;
    integers.at(2) = 10;
    std::ranges::copy(integers, output);
    std::cout << std::endl;

    integers.insert(integers.cbegin() + 1, 22);
    std::ranges::copy(integers, output);
    std::cout << std::endl;

    //erase
    integers.erase(integers.cbegin());
    std::cout << "\nintegers after earse first element:\n";
    std::ranges::copy(integers, output);
    std::cout << std::endl;

    return 0;
}